%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/rbac.deletePerson"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 12, 20, 13, 15<br /><br />1: PgDeleteSingle[9]<br />2: <br />ᐳ: Object[14]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 9, 15, 14<br /><br />ROOT Object{1}ᐸ{result}ᐳ[14]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ3ᐳ[20]"}}:::plan
    Object12{{"Object[12∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access10{{"Access[10∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access11{{"Access[11∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access10 & Access11 --> Object12
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access10
    __Value2 --> Access11
    ApplyInput13{{"ApplyInput[13∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput13
    PgDeleteSingle9[["PgDeleteSingle[9∈1] ➊<br />ᐸperson(id)ᐳ<br />More deps:<br />- Constantᐸ3ᐳ[20]"]]:::sideeffectplan
    Object12 & ApplyInput13 --> PgDeleteSingle9
    Object14{{"Object[14∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgDeleteSingle9 --> Object14
    List18{{"List[18∈2] ➊<br />ᐸ15,16ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[15]"}}:::plan
    PgClassExpression16{{"PgClassExpression[16∈2] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression16 --> List18
    Access17{{"Access[17∈2] ➊<br />ᐸ9.tᐳ"}}:::plan
    Access17 --> PgClassExpression16
    PgDeleteSingle9 --> Access17
    Lambda19{{"Lambda[19∈2] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List18 --> Lambda19

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,Access10,Access11,Object12,ApplyInput13 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgDeleteSingle9,Object14 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression16,Access17,List18,Lambda19 bucket2

